<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8" />
    <title>游记</title>

    <meta name="Keywords" content="游记" />
    <meta name="Description" content="游记" />
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <!-- Mobile Devices Support @begin -->
    <meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
    <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
    <meta content="no-cache" http-equiv="pragma">
    <meta content="0" http-equiv="expires">
    <meta content="telephone=no, address=no" name="format-detection">
    <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <!--external css-->
    <link href="{{ URL::asset('/') }}admin/flatlib/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <!-- Mobile Devices Support @end -->
    <link href="{{ URL::asset('/') }}admin/mobile/css/index.css" rel="stylesheet" type="text/css" />
    <script src="{{ URL::asset('/') }}admin/js/libs/jquery-3.1.1.min.js"></script>
    <script type="text/javascript" src="{{ URL::asset('/') }}admin/js/libs/layer/layer.js"></script>
    <script type="text/javascript" src="{{ URL::asset('/') }}admin/mobile/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="{{ URL::asset('/') }}admin/mobile/js/main.js"></script>
    <script type="text/javascript" src="{{ URL::asset('/') }}admin/mobile/js/jquery.rotate.min.js"></script>
    <script type="text/javascript" src="{{ URL::asset('/') }}admin/mobile/js/jQuery-jcMarquee.js"></script>
    <script src="{{ URL::asset('/') }}admin/mobile/js/idangerous.swiper-1.9.1.min.js"></script>

    <script type="text/javascript">
        $(function(){
            //Main Swiper
            var swiper = new Swiper('.swiper1', {
                pagination : '.pagination1',
                loop:true,
                autoPlay:5000,
                grabCursor: true
            });
            //Clickable pagination
            $('.pagination1 .swiper-pagination-switch').click(function(){
                swiper.swipeTo($(this).index())
            });
        });
    </script>

</head>

<body>
<div class="main">
    <!--头部-->
    <div class="header" id="bktop">
        <div class="logo">
            <a href="../morindex"><img src="{{ URL::asset('/') }}admin/icon/fan.png"></a>
            <strong style="color: #fff;">报名信息</strong>
            {{--<div class="head">--}}
                {{--<a href="#" style="background-color:white;color:#FA9800;"><strong>报名信息</strong></a>--}}
                {{--<a href="../morhistory/{{$id}}"><strong>历史报名</strong></a>--}}
            {{--</div>--}}

        </div>
        <div class="clearBoth"></div>
    </div>
    <!--列表-->
    <div class="news">
        <!--资讯列表-->
        @if($morenroll['count'] == 0)
            <div class="no-data">暂无内容</div>
        @else
        <div class="newslist">
            @foreach($morenroll['list'] as $a)
            <div class="qtao" style="padding-top: 15px;">
                <div class="mg">
                    <div class="mgr">
                        <div class="cen">
                            <p class="title"><span>真实姓名:</span> <span>{{$a->real_name}}</span></p>
                            <p class="title2"><span>联系方式:</span> <span>{{$a->mobile}}</span></p>
                            <p class="title2"><span>身份证号:</span> <span>{{$a->idcard}}</span></p>

                        </div>
                        <div class="ydu">
                            <div class="anniu">
                                <div class="clearBoth"></div>
                                <div class="beizhu">
                                    <button onclick="Reason();" _href="/admin/activity/morenreason/{{ $a->enroll_id}}/{{$a->personal_id}}" value="{{$a->reason}}" class="reason but">备注</button>
                                    <button  onclick="deleteNotice();" _href="/admin/activity/morenrolldelete/{{ $a->enroll_id}}/{{$a->personal_id}}" class="delete but1"><i class="icon-trash "></i></button>
                                </div>
                            </div>
                            <div class="clearBoth"></div>
                        </div>
                    </div>
                    <div class="clearBoth"></div>
                </div>
            </div>
            @endforeach
        </div>
        @endif
    </div>
</div>


<script>
  var deleteNotice = function () {
        $('.delete').bind('click' , function () {

            var href = $(this).attr('_href');
            layer.confirm('您确定要删除此项？', {
                btn: ['确定','取消'] //按钮
            }, function(yes){
                layer.close(yes);
                var layerLoad = layer.load(1, {
                    shade: [0.1,'#fff'] //0.1透明度的白色背景
                });

                $.ajax({
                    url     : href,
                    type    : 'GET',
                    headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
                    dataType : 'json' ,
                    success : function (data) {
                        if(data.code == 0){
                            layer.msg('删除成功');
                            window.location.reload();
                        }else{
                            layer.alert(data.msg);
                        }
                        layer.close(layerLoad);
                    },
                    error : function (error) {
                        layer.alert(error.statusText);
                        layer.close(layerLoad);
                    }
                });
            }, function(no){
                layer.close(no);
            });
        });
    };
  var Reason = function () {
      $('.reason').bind('click' , function () {
          var res= $(this).val();

          console.log(111);

          var href = $(this).attr('_href');
          layer.confirm('请输入备注:'+'<br/>'+'<input style="border: 1px #4B9ADE solid;width: 100%;height:30px;border-radius: 3px; padding-left:10px; " value="'+res+'" type="text" id="reason"/>', {
              btn: ['确定','取消'] //按钮
          }, function(yes){
              layer.close(yes);
              var layerLoad = layer.load(1, {
                  shade: [0.1,'#fff'] //0.1透明度的白色背景
              });
              var reason= $('#reason').val();

              $.ajax({
                  url     : href,
                  type    : 'GET',
                  headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
                  dataType : 'json' ,
                  data:{reason:reason},
                  success : function (data) {
                      if(data.code == 0){
                          layer.msg('修改成功');
                          window.location.reload();
                      }else{
                          layer.alert(data.msg);
                      }
                      layer.close(layerLoad);
                  },
                  error : function (error) {
                      layer.alert(error.statusText);
                      layer.close(layerLoad);
                  }
              });
          }, function(no){
              layer.close(no);
          });
      });
  };
</script>

<script type="text/javascript">
    $('#Marquee_x').jcMarquee({ 'marquee':'x','margin_right':'300px','speed':20 });
</script>
</body>
</html>